#!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
@author:jidi
@file:session_factory.py
@time:2022/08/14
"""
from service.wework.api.session_http_api import SessionHttpApi
from service.wework.model.calendar_app import CalendarApp
from service.wework.model.session import Session
from service.wework.model.wework import WeWork


class SessionFactory:
    @classmethod
    def create_session(cls, implement, wework: WeWork, app: CalendarApp):
        if implement == 'service':
            return SessionHttpApi(wework, app)
        else:
            return Session()
